<%-- 
    Document   : checkout
    Created on : Oct 9, 2012, 2:42:03 AM
    Author     : Nhan
--%>

<%@page import="com.User"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Checkout Page</title>
    </head>
    <body>
        <%
            session = request.getSession();
            User curUser = (User)session.getAttribute("currentUser");
            if(curUser != null) {
                String role = curUser.getRole().trim();
                if(role.equalsIgnoreCase("guest")) {
                out.println("<h1>Only Customer And Manager can do this task!<h1>");
                } else {
                    %>
                    <h3>Here are some item(s) you want to placed to order:</h3>
                    <%@include file="cartDetail.jsp" %>
                    <h3>Click checkout to complete your order</h3>
                    <form action="centralUnit" method="GET">
                        <input type="submit" name="action" value="Checkout" size="100" />
                    </form>
               <% }
            }
        %>
        
    </body>
</html>
